package com.dq.eduservice.service;

import com.dq.eduservice.entity.EduVideo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dq.eduservice.vo.chapter.VideoVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 课程视频(EduVideo)表服务接口
 *
 * @author Dq
 * @since 2022-07-22 19:51:20
 */
@Transactional
public interface EduVideoService  extends IService<EduVideo> {

    /**
     * 根据章节id查询是否纯在单个小节
     * @param chapterId
     * @return
     */
    List<EduVideo> getEduVideoByChapterId(String chapterId);

    /**
     * 根据章节Id删除所有小节
     */
    void deleteAllByChaperId(String chapterId);

    /**
     * 添加小节
     * @param videoVo
     */
    void addVideo(VideoVo videoVo);

    /**
     * 修改小节
     * @param videoVo
     */
    void updateVideo(VideoVo videoVo);

    /**
     * 删除小节
     * @param videoId
     */
    void deleteVideoById(String videoId);

    /**
     * 根据小节获取具体的数据
     * @param videoId
     * @return
     */
    VideoVo getVideoById(String videoId);

    /**
     *
     * @param courseId
     */
    void deleteVideoByCourseId(String courseId);
}